/************************************************************************
 *
 * stddef.h
 *
 * (c) Copyright 1996-2005 Analog Devices, Inc.  All rights reserved.
 * $Revision: 6 $
 ************************************************************************/

#pragma once
#ifndef __NO_BUILTIN
#pragma system_header /* stddef.h */
#endif

#ifndef __STDDEF_DEFINED
#define __STDDEF_DEFINED

#ifndef _YVALS
 #include <yvals.h>
#endif

#ifndef NULL
#ifdef __cplusplus
#define NULL	0
#else
#define NULL	((void *)0)
#endif
#endif

#ifndef __PTRDIFF_T_DEFINED
#define __PTRDIFF_T_DEFINED
typedef _Ptrdifft ptrdiff_t;
#endif

#if !defined(__SIZE_T_DEFINED) && !defined(_SIZET)
  #define __SIZE_T_DEFINED
  #define _SIZET
  typedef _Sizet size_t;
#endif

#if !defined(__WCHAR_T_DEFINED) && !defined(_WCHART)
  #define __WCHAR_T_DEFINED
  #define _WCHART
  typedef _Wchart wchar_t;
#endif

# ifndef offsetof
#  ifdef __EDG__
#   define offsetof(s,m) ((size_t)__INTADDR__(&(((s *)0)->m)))
#  else /* __EDG__ */
#   define offsetof(s,m) \
            ((size_t) &(((s *) 0)->m) * ((sizeof (((s *) 0)->m) < \
                sizeof (int)) ? sizeof (((s *) 0)->m) : sizeof (int)))
#  endif /* __EDG__ */
# endif

#endif
